<template>
  <div style="width: 100%; height: 100%">
    <dv-scroll-board :config="config" />
  </div>
</template>
<script>
import { getCityData } from '../util/home'
export default {
  name: "",
  components: {},
  data() {
    return {
      config: {},
      header: ["摊位号", "商品名称", "检测项目", "检测结果", "检测时间"],
      data: [],
    };
  },

  created() {
    this.getCityData()
  },
  methods: {
    getCityData() {
      getCityData().then(res => {
        let array = res.data.data
        array.forEach((item) => {
          let arr = []
          arr[0] = item.twh
          arr[1] = item.ypmc
          arr[2] = item.jcxm
          arr[3] = `<span style="color:#1AED83;">${item.jcjg}</span>`
          arr[4] = item.date
          this.data.push(arr)
        });
        this.config = {
          header: this.header,
          headerBGC: "none",
          oddRowBGC: "#17325B",
          evenRowBGC: "#0C1B48",
          columnWidth: ['110'],
          data: this.data,
          align: ["center", "center", "center", "center", "center"],
        };
      })
    }
  },
};
</script>
<style lang="less">
.home-container .content .item-box .item .dv-scroll-board .header .header-item {
  color: #0fffff;
  font-size: 14px;
}

.dv-scroll-board {
  width: 100% !important;
  height: 100% !important;
}
</style>
